<?php $view->extend('::base.html.php') ?>
<div class="guide">
<form action="<?php echo $view['router']->generate('guides_edit', array('guideId' => $guideId)) ?>" method="post" <?php echo $view['form']->enctype($form); ?>>
	<?php echo $view['form']->row($form['title']) ?>
	<div chapterscontainer class="chapters" dataprototype="<?php echo $view->escape($view['form']->widget($form['chapters']->vars['prototype']['title']) . $view['form']->widget($form['chapters']->vars['prototype']['rawText'])) ?>">
		<?php 
			foreach ($form['chapters'] as $chapter):				
		?>
		<div class="chapter">
			<div chaptermenu ></div>
			<?php echo $view['form']->widget($chapter['title']); ?>
			<?php echo $view['form']->widget($chapter['rawText']); ?>
		</div>
		<?php endforeach; ?>
	</div>
	
	<?php echo $view['form']->widget($form['_token']) ?>
    <input type="submit" />
</form>
</div>
